package com.lingdian.resume.service.impl;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.springframework.stereotype.Service;

import com.lingdian.member.bean.Member;
import com.lingdian.resume.bean.ListItem;
import com.lingdian.resume.service.ListItemService;
@Service("listItemService")
public class ListItemServiceImpl implements ListItemService{
	
	@PersistenceContext
	private EntityManager entityManager;

	@Override
	public ListItem saveListItem(ListItem item) {
		ListItem i1 = new ListItem();
		ListItem i2 = new ListItem();
		Member m1 = new Member();
		m1.setLoginName("test123");
		i1.setOwner(m1);
		i2.setOwner(m1);
		entityManager.persist(m1);
		entityManager.persist(i1);
		entityManager.flush();
		m1.setLoginName("111");
		return null;
	}

}
